<div class = "categories">
    <form id = "guestbook_form" method = "post" class = "form-horizontal" autocomplete = "off"
          action = "${BASE_PATH}/guestbook/add.json" enctype = "multipart/form-data">
        <fieldset>
            <div class = "form-group">
                <label class = "col-sm-2 col-sm-2 control-label">姓名</label>

                <div class = "col-sm-10">
                    <input type = "text" style = "font-size:15px;" class = "form-control" name = "name" placeholder = "姓名" id = "folderName"></input>
                </div>
            </div>
            <div class = "form-group">
                <label class = "col-sm-2 col-sm-2 control-label">手机</label>

                <div class = "col-sm-10">
                    <input style = "font-size:15px;"
                           class = "form-control" name = "email" placeholder = "手机号码">
                </div>
            </div>
            <div class = "form-group">
                <label class = "col-sm-2 col-sm-2 control-label">标题</label>

                <div class = "col-sm-10">
                    <input style = "font-size:15px;"
                           class = "form-control" name = "title" placeholder = "标题">
                </div>
            </div>
            <div class = "form-group">
                <label class = "col-sm-2 col-sm-2 control-label">手机</label>
                <div class = "col-sm-10">
                    <textarea name = "content" placeholder = "内容" class = "form-control"></textarea>
                </div>
            </div>
            <div class = "form-group">
                <div class = "col-lg-offset-2 col-lg-10">
                    <button class = "btn btn-danger" type = "submit">保存</button>
                </div>
            </div>
        </fieldset>
    </form>
</div>
<script type = "text/javascript" src = "/static/manage/js/jquery.form.min.js"></script>
<script type = "text/javascript" src = "/static/manage/js/common-scripts.js"></script>
<script type = "text/javascript" src = "/static/manage/js/bootbox.min.js"></script>
<script type = "text/javascript">
    $(function () {
        $('#guestbook_form').ajaxForm({
            dataType: 'json',
            success: function (data) {
                if (data.result) {
                    bootbox.alert("保存成功，将刷新页面", function () {
                        window.location.reload();

                    });
                } else {
                    showErrors($('#addFolder_form'), data.errors);
                }
            }
        });
    });
</script>